package com.cake.service.inter;

import java.util.List;

import com.cake.entity.XxProduct;
import com.cake.entity.pojo.ProductPoJo;
import com.cake.service.base.IBaseService;

public interface IXxProductService extends IBaseService<XxProduct>{
	
	/**
	 * 商品列表查询
	 * @param xxProduct
	 * @return
	 */
	List<XxProduct> selectProductInfos(XxProduct xxProduct);
	
	/**
	 * 商品详情查询
	 * @return
	 */
	ProductPoJo selectProductDetails(Long productId);
	
	/**
	 * 添加一条商品以及规格
	 * @param productPoJo
	 * @return
	 * @throws Exception 
	 */
	Integer insertOrUpdateProductAndSpecifications(ProductPoJo productPoJo) throws Exception;
	
	/**
	 * 添加一条商品图片对象
	 * @param productId
	 * @param base64String
	 * @return
	 * @throws Exception 
	 */
	String insertProductImage(Long productId, String base64String) throws Exception;
	
	/**
	 * 根据商品分类查询查询商品
	 */
	List<XxProduct> selectProductsByCategory(Long productCategoryId);
	
}
